<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查询页面</title>
</head>
<body>
<table>
    <thead>
    <tr>
        <th>文件名</th>
        <th>份数</th>
        <th>方向</th>
        <th>单彩</th>
        <th>方式</th>
        <th>状态</th>
        <th>订单号</th>
    </tr>
    </thead>
    <tbody>

    {% for i in names %}
{#        {% if current_user.Role == 'admin' %}#}
            <tr>
                <td style="text-align: center">
                    {% if i.File_Dir[-3:] == "pdf" %}
                        <a href="#" onclick="window.open('../admin/look/viewer.html?file=../../static/Upload_Files/{{ i.File_Dir }}','PDF','width:50%;height:50%;top:100;left:100;');">
                            {{ i.File_Name[:-4] }}{{ i.File_Dir[-4:] }}
                        </a>
                    {% endif %}
                    {% if i.File_Dir[-3:] != "pdf" %}
                        <a href="../static/Upload_Files/{{ i.File_Dir }}">
                            {{ i.File_Name[:-4] }}{{ i.File_Dir[-4:] }}
                        </a>
                    {% endif %}
                </td>
                <td style="text-align: center">{{ i.Print_Copies }}</td>
                <td style="text-align: center">
                    {% if i.Print_Direction == 3 %}
                        <p>纵向</p>
                    {% endif %}
                    {% if i.Print_Direction == 4 %}
                        <p>横向</p>
                    {% endif %}
                </td>
                <td style="text-align: center">
                    {% if i.Print_Colour == 'mono' %}
                        <p>黑白</p>
                    {% endif %}
                    {% if i.Print_Colour == 'color' %}
                        <p>彩色</p>
                    {% endif %}
                </td>
                <td style="text-align: center">
                    {% if i.Print_way == 'one-sided' %}
                        <p>单面</p>
                    {% endif %}
                    {% if i.Print_way == 'two-sided-long-edge' %}
                        <p>双面长边</p>
                    {% endif %}
                    {% if i.Print_way == 'two-sided-short-edge' %}
                        <p>双面短边</p>
                    {% endif %}
                </td>

                <td style="text-align: center">
                    {% if i.Print_Status == 0 %}
                        <p>未支付</p>
                    {% endif %}
                    {% if i.Print_Status == 1 %}
                        <p>已支付</p>
                    {% endif %}
                    {% if i.Print_Status == 2 %}
                        <p>正在打印</p>
                    {% endif %}
                    {% if i.Print_Status == 3 %}
                        <p>打印结束/p>
                    {% endif %}
                </td>
                <td style="text-align: center">{{ i.Trade_Number }}</td>
            </tr>
{#        {% endif %}#}
{#        {% if current_user.Role == 'guest' %}#}
{#            {% if i.User_Id == current_user.Id %}#}
{#                <tr>#}
{#                <td style="text-align: center">#}
{#                    {% if i.File_Dir[-3:] == "pdf" %}#}
{#                        <a href="#" onclick="window.open('../admin/look/viewer.html?file=../../static/Upload_Files/{{ i.File_Dir }}','PDF','width:50%;height:50%;top:100;left:100;');">#}
{#                            {{ i.File_Name[:-4] }}{{ i.File_Dir[-4:] }}#}
{#                        </a>#}
{#                    {% endif %}#}
{#                    {% if i.File_Dir[-3:] != "pdf" %}#}
{#                        <a href="../static/Upload_Files/{{ i.File_Dir }}">#}
{#                            {{ i.File_Name[:-4] }}{{ i.File_Dir[-4:] }}#}
{#                        </a>#}
{#                    {% endif %}#}
{#                </td>#}
{#                <td style="text-align: center">{{ i.Print_Copies }}</td>#}
{#                <td style="text-align: center">#}
{#                    {% if i.Print_Direction == 3 %}#}
{#                        <p>纵向</p>#}
{#                    {% endif %}#}
{#                    {% if i.Print_Direction == 4 %}#}
{#                        <p>横向</p>#}
{#                    {% endif %}#}
{#                </td>#}
{#                <td style="text-align: center">#}
{#                    {% if i.Print_Colour == 'mono' %}#}
{#                        <p>黑白</p>#}
{#                    {% endif %}#}
{#                    {% if i.Print_Colour == 'color' %}#}
{#                        <p>彩色</p>#}
{#                    {% endif %}#}
{#                </td>#}
{#                <td style="text-align: center">#}
{#                    {% if i.Print_way == 'one-sided' %}#}
{#                        <p>单面</p>#}
{#                    {% endif %}#}
{#                    {% if i.Print_way == 'two-sided-long-edge' %}#}
{#                        <p>双面长边</p>#}
{#                    {% endif %}#}
{#                    {% if i.Print_way == 'two-sided-short-edge' %}#}
{#                        <p>双面短边</p>#}
{#                    {% endif %}#}
{#                </td>#}
{##}
{#                <td style="text-align: center">#}
{#                    {% if i.Print_Status == 0 %}#}
{#                        <p>未支付</p>#}
{#                    {% endif %}#}
{#                    {% if i.Print_Status == 1 %}#}
{#                        <p>已支付</p>#}
{#                    {% endif %}#}
{#                    {% if i.Print_Status == 2 %}#}
{#                        <p>正在打印</p>#}
{#                    {% endif %}#}
{#                    {% if i.Print_Status == 3 %}#}
{#                        <p>打印结束/p>#}
{#                    {% endif %}#}
{#                </td>#}
{#                <td style="text-align: center">{{ i.Trade_Number }}</td>#}
{#            </tr>#}
{#            {% endif %}#}
{#        {% endif %}#}
    {% endfor %}
    </tbody>
</table>
</body>
</html>